From 60601edd87194218d62da6ea1275eea32281491d Mon Sep 17 00:00:00 2001 From: robertlipe Date: Wed, 6 Feb 2013 19:50:27 +0000 Subject: [PATCH] Add some of the mechanical casts for gbser_win.cc. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@4280 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/defs.h | 4 ++-- gpsbabel/gbser_win.cc | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gpsbabel/defs.h b/gpsbabel/defs.h index 5883400e7..962765288 100644 --- a/gpsbabel/defs.h +++ b/gpsbabel/defs.h @@ -575,8 +575,8 @@ class route_head { rte_name(NULL), rte_desc(NULL), rte_url(NULL), - rte_num(NULL), - rte_waypt_ct(NULL), + rte_num(0), + rte_waypt_ct(0), fs(NULL), cet_converted(0), line_width(-1), diff --git a/gpsbabel/gbser_win.cc b/gpsbabel/gbser_win.cc index e60850074..ac1cfacc0 100644 --- a/gpsbabel/gbser_win.cc +++ b/gpsbabel/gbser_win.cc @@ -168,7 +168,7 @@ const char* fix_win_serial_name(const char* comname) void* gbser_init(const char* port_name) { HANDLE comport; - gbser_handle* h = xcalloc(1, sizeof(*h)); + gbser_handle* h = (gbser_handle*) xcalloc(1, sizeof(*h)); const char* xname = fix_win_serial_name(port_name); gbser__db(2, "Translated port name: \"%s\"\n", xname); @@ -259,7 +259,7 @@ unsigned gbser__read_buffer(void* handle, void** buf, unsigned* len) { gbser_handle* h = gbser__get_handle(handle); unsigned count = *len; - unsigned char* cp = *buf; + unsigned char* cp = (unsigned char *) *buf; if (count > h->inbuf_used) { count = h->inbuf_used; } @@ -357,7 +357,7 @@ int gbser_write(void* handle, const void* buf, unsigned len) { gbser_handle* h = gbser__get_handle(handle); DWORD nwritten; - const char* bp = buf; + const char* bp = (const char *) buf; /* Not sure we need to spin here - but this'll work even if we don't */ while (len > 0) { if (!WriteFile(h->comport, bp, len, &nwritten, NULL)) { @@ -426,7 +426,7 @@ int gbser_read_line(void* handle, void* buf, unsigned len, unsigned ms, int eol, int discard) { - char* bp = buf; + char* bp = (char *) buf; unsigned pos = 0; hp_time tv; get_time(&tv); -- 2.30.2